package com.example.gesturetest;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;

public class AnimationViewActivity extends Activity implements
		View.OnClickListener {

	View view;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getWindow().getAttributes().windowAnimations = R.style.Slide;
		setContentView(R.layout.activity_animation_view);

		Button button = (Button) findViewById(R.id.toggleButton);
		button.setOnClickListener(this);
		view = findViewById(R.id.testImage);

	}

	@Override
	public void onClick(View arg0) {
		Animation animation = AnimationUtils.loadAnimation(this,
				R.anim.rotate_around_center_point);
		view.startAnimation(animation);
	}

}
